package com.jwpdk.appframework.data;

import java.util.List;

public interface IDataList extends List {

	/**
	 * Sort order Constants
	 */
	public static final int	ORDER_ASCEND	= 0;

	public static final int	ORDER_DESCEND	= 1;

	public static final int	TYPE_STRING		= 2;

	public static final int	TYPE_INTEGER	= 3;

	public static final int	TYPE_DOUBLE		= 4;

	/**
	 * get object
	 * @param index
	 * @param name
	 * @return Object
	 */
	public Object get(int index, String name);

	/**
	 * get object
	 * @param index
	 * @param name
	 * @param def
	 * @return Object
	 */
	public Object get(int index, String name, Object def);

	/**
	 * to data
	 * @return IData
	 */
	public IData toData() throws Exception;

	/**
	 * get count
	 * @return int
	 */
	public int count();

	/**
	 * sort single (default ascend)
	 */
	public void sort(String key, int type);

	/**
	 * sort single
	 */
	public void sort(String key, int type, int order);

	/**
	 * sort double (default ascend)
	 */
	public void sort(String key1, int keyType1, String key2, int keyType2);

	/**
	 * sort double
	 */
	public void sort(String key1, int keyType1, int order1, String key2, int keyType2, int order2);
}